<template>
  <view>
    <view class="item" v-for="item in info" :key="item.id">
      <text>{{item.content}}</text>
      <view class="yanS">{{item.create_time}}</view>
    </view>
  </view>
</template>

<script>
  import { getNotice } from '../../request/api.js'
  export default {
    data() {
      return {
        info: []
      }
    },
    onShow() {
      this.getnoticeInfo()
    },
    methods: {
      getnoticeInfo(){
        getNotice().then((res) => {
          // console.log(res)
          this.info = res.noticeList
        }).catch((err) => {
          console.log(err)
        })
      }
    }
  }
</script>

<style>
  page{
    background-color:#f2f2f2;
  }
  .item {
    width: 84%;
    height: 140rpx;
    background-color: #ffffff;
    padding: 20rpx;
    margin: 20rpx auto;
    margin-bottom: 24rpx;
    border-radius: 20rpx;
    position: relative;
  }

  .yanS {
    font-size: 24rpx;
    color: black;
    position: absolute;
    bottom: 20rpx;
    right: 20rpx;
  }
</style>